From 436d2ef5ceb96c6d9547ad09e40d951b4fa1c823 Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Fri, 25 Jul 2003 12:18:46 +0000 Subject: [PATCH] (mouse-sel-get-selection-function): Check `x-last-selected-text-primary'. Don't barf if it or `x-last-selected-text' aren't bound. --- lisp/mouse-sel.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el index bba41a0dbf9..bbbb1e54595 100644 --- a/lisp/mouse-sel.el +++ b/lisp/mouse-sel.el @@ -313,7 +313,9 @@ unless `mouse-sel-default-bindings' is `interprogram-cut-paste'.") (defvar mouse-sel-get-selection-function (lambda (selection) (if (eq selection 'PRIMARY) - (or (x-cut-buffer-or-selection-value) x-last-selected-text) + (or (x-cut-buffer-or-selection-value) + (bound-and-true-p x-last-selected-text) + (bound-and-true-p x-last-selected-text-primary)) (x-get-selection selection))) "Function to call to get the selection. Called with one argument: -- 2.30.2